%h2 Edit User Account

= error_messages_for :user

%fieldset
  - form_for(@user) do |f|
    %ul
      = label_tag 'username'
      = f.text_field :login
    %ul
      = label_tag 'email'
      = f.text_field :email

    %ul
      = label_tag 'First Name'
      = f.text_field :first_name

    %ul
      = label_tag 'Last Name'
      = f.text_field :last_name


    - if current_user.user_status.name == "Super User"
      %ul
        = f.label :user_status_id
        = collection_select(:user, :user_status_id, @user_statuses, :id, :name )
    - else
      = f.hidden_field(:user_status_id)

    %ul
      = label_tag 'password'
      = f.password_field :password
    
    %ul
      = label_tag 'password_confirmation', 'Confirm Password'
      = f.password_field :password_confirmation
    
    %ul
      = submit_tag 'Update Account'
